/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class TVersionChannelsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "channelversionid")
    private String channelversionid;
    @Basic(optional = false)
    @Column(name = "channel_id")
    private String channelId;

    public TVersionChannelsPK() {
    }

    public TVersionChannelsPK(String channelversionid, String channelId) {
        this.channelversionid = channelversionid;
        this.channelId = channelId;
    }

    public String getChannelversionid() {
        return channelversionid;
    }

    public void setChannelversionid(String channelversionid) {
        this.channelversionid = channelversionid;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (channelversionid != null ? channelversionid.hashCode() : 0);
        hash += (channelId != null ? channelId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TVersionChannelsPK)) {
            return false;
        }
        TVersionChannelsPK other = (TVersionChannelsPK) object;
        if ((this.channelversionid == null && other.channelversionid != null) || (this.channelversionid != null && !this.channelversionid.equals(other.channelversionid))) {
            return false;
        }
        if ((this.channelId == null && other.channelId != null) || (this.channelId != null && !this.channelId.equals(other.channelId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TVersionChannelsPK[channelversionid=" + channelversionid + ", channelId=" + channelId + "]";
    }

}
